﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Ivy.Common.Framework.Base;
using System.Runtime.Serialization;

namespace Ivy.UserRegistration.Entity
{
    [Serializable]
    [DataContract]
    public class Sys_SessionLog : DataEntityBase
    {
        #region  Variable & constant
        Int32 lSessionLogPrimaryID = -1;
        string lUserSessionID = string.Empty;
        string lUserIPAddress = string.Empty;
        DateTime lUserSessionStartTime = DateTime.Now;
        Nullable<DateTime> lUserSessionEndTime = null;
        string lUserBrowserName = string.Empty;
        Int32 lUserKey = -1;
        #endregion  Variable & constant

        #region Constructor & Destructor
        public Sys_SessionLog()
            : base()
        {
            this.Sys_DeleteType = DeleteType.SoftDeleteOnly;
        }
        #endregion Constructor & Destructor

        #region Properties
        [DataMember]
        public Int32 SessionLogPrimaryID
        {
            get
            {
                return lSessionLogPrimaryID;
            }
            set
            {
                lSessionLogPrimaryID = value;
                base.SetEntityStateChangeAttribute();
            }
        }

        [DataMember]
        public string UserSessionID
        {
            get
            {
                return lUserSessionID;
            }
            set
            {
                lUserSessionID = value;
                base.SetEntityStateChangeAttribute();
            }
        }

        [DataMember]
        public string UserIPAddress
        {
            get
            {
                return lUserIPAddress;
            }
            set
            {
                lUserIPAddress = value;
                base.SetEntityStateChangeAttribute();
            }
        }

        [DataMember]
        public DateTime UserSessionStartTime
        {
            get
            {
                return lUserSessionStartTime;
            }
            set
            {
                lUserSessionStartTime = value;
                base.SetEntityStateChangeAttribute();
            }
        }

        [DataMember]
        public Nullable<DateTime> UserSessionEndTime
        {
            get
            {
                return lUserSessionEndTime;
            }
            set
            {
                lUserSessionEndTime = value;
                base.SetEntityStateChangeAttribute();
            }
        }

        [DataMember]
        public string UserBrowserName
        {
            get
            {
                return lUserBrowserName;
            }
            set
            {
                lUserBrowserName = value;
                base.SetEntityStateChangeAttribute();
            }
        }

        [DataMember]
        public Int32 UserKey
        {
            get
            {
                return lUserKey;
            }
            set
            {
                lUserKey = value;
                base.SetEntityStateChangeAttribute();
            }
        }
        #endregion Properties

        #region Public Methods
        #endregion Public Methods

        #region Events
        #endregion Events

        #region Private Methods
        #endregion Private Methods
    }
}
